package common.io;

import com.google.inject.AbstractModule;
import com.google.inject.TypeLiteral;
import com.google.inject.assistedinject.FactoryModuleBuilder;

import java.nio.file.FileVisitor;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * Created by Gerardo on 1/24/14.
 */
public class NioModule extends AbstractModule {
	@Override
	protected void configure() {
		bind(Path.class).toInstance(Paths.get("."));
		bind(FileVisitor.class).to(Printer.class);
		install(new FactoryModuleBuilder().implement(new TypeLiteral<FileVisitor<Path>>() {}, Copier.class).build(CopierFactory.class));
	}
}
